<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<% String webctx = request.getContextPath(); %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>中国期货有限公司</title>
<link href="<%=webctx%>/system/login/skin/style.css" rel="stylesheet" type="text/css" id="skin"/>
<script type="text/javascript" src="<%=webctx%>/libs/js/jquery.js"></script>
<script type="text/javascript" src="<%=webctx%>/libs/js/login.js"></script>
<!--居中显示start-->
<script type="text/javascript" src="<%=webctx%>/libs/js/method/center-plugin.js"></script>
<!--居中显示end-->
<!--修正IE6支持透明png图片start-->
<script type="text/javascript" src="<%=webctx%>/libs/js/method/pngFix/supersleight.js"></script>
<!--修正IE6支持透明png图片end-->
<style>
/*提示信息*/	
#cursorMessageDiv {
	position: absolute;
	z-index: 99999;
	border: solid 1px #cc9933;
	background: #ffffcc;
	padding: 2px;
	margin: 0px;
	display: none;
	line-height:150%;
}
#bg{
	position:absolute;
	top:0px;
	left:0px;
	z-index:-999;
}
/*提示信息*/
</style>
</head>
<body>
<%-- <img style="position: absolute;width: 100%;position:absolute;top:0;left:0; " src="<%=webctx%>/system/login/skin/1.jpg">
 --%>	<div class="login_main" align="center">
		<div class="login_top">
		<form id="loginForm" name="loginForm" action="<%=webctx%>/login/login.action" class="login_form" method="post">
					<div class="login_user"><input type="text" name="user.u_login_id" value="admin" id="username"></div>
					<div class="login_pass"><input type="password" name="user.u_login_pwd" value="admin" id="password"></div>
					<div class="clear"></div>
					<div class="login_button">
						<div class="login_button_left"><input type="button" onclick="login()"/></div>
						<div class="login_button_right"><input type="reset" value=""/></div>
						<div class="clear"></div>
					</div>
					<div class="login_info" style="display:none;"></div>
		</form>
		</div>
<%-- 		<div class="login_middle">
			<div class="login_middleleft"></div>
			<div class="login_middlecenter">
					<form id="loginForm" name="loginForm" action="<%=webctx%>/login/login.action" class="login_form" method="post">
					<div class="login_user"><input type="text" name="user.u_login_id" value="admin" id="username"></div>
					<div class="login_pass"><input type="password" name="user.u_login_pwd" value="admin" id="password"></div>
					<div class="clear"></div>
					<div class="login_button">
						<div class="login_button_left"><input type="button" onclick="login()"/></div>
						<div class="login_button_right"><input type="reset" value=""/></div>
						<div class="clear"></div>
					</div>
					</form>
					<div class="login_info" style="display:none;"></div>
			</div>
			<div class="login_middleright"></div>
			<div class="clear"></div>
		</div>
		<div class="login_bottom">
			<div class="login_copyright">版权所有:南京瑞嘉软件有限公司</div>
		</div> --%>
	</div>

<div id="bg">
<div style="top: 0;left: 0;position: absolute;z-index: 1;width: 100%;height: 100%"></div>
<img  src="<%=webctx%>/system/login/skin/1.jpg" alt="HIGH">
</div>
<script type="text/javascript">
	window.onresize = window.onload = function(){
					var w,h
					if(!!(window.attachEvent && !window.opera)){
						h = document.documentElement.clientHeight;
						w = document.documentElement.clientWidth;
					}else{
						h =	window.innerHeight;
						w = window.innerWidth;
					}
				var bgImg = document.getElementById('bg').getElementsByTagName('img')[0];
				bgImg.width = (w);
				bgImg.height= (h) ;
				$(bgImg).css({'z-index':-1,'position': 'absolute',top:0,left:0});
			}			
</script>
</body>
<script type="text/javascript" language="javascript">
	$(function(){
		//居中
		$('body').supersleight();
		 $('.login_top').center();
		 //document.getElementById("username").focus();
		 $("#username").keydown(function(event){
		 	if(event.keyCode==13){
				login()
			}
		 });
		 $("#password").keydown(function(event){
		 	if(event.keyCode==13){
				login();
			}
		 });
		 
	});
	//登录
	function login() {
		var errorMsg = "";
		var loginName = document.getElementById("username");
		var password = document.getElementById("password");
		if(!loginName.value){
			errorMsg += "&nbsp;&nbsp;用户名不能为空!";
		}
		if(!password.value){
			errorMsg += "&nbsp;&nbsp;密码不能为空!";
		}

		if(errorMsg != ""){
			$(".login_info").html(errorMsg);
			$(".login_info").show();
		}
		else{
			$(".login_info").html("&nbsp;&nbsp;正在验证登陆...").show();
				document.loginForm.submit();
		}
	}
	$(function(){
		var uid = "<s:property value='#session.u_id'/>";
		if(uid!=null&&uid!=""){
			window.location = '<%=webctx%>/jsp/frame/main.jsp';
		}
		var result = "<s:property value='result' escape='false'/>";
		if(result!=null&&result!=""){
			$(".login_info").html("&nbsp;&nbsp;"+result).show();
		}
	});

</script>
</html>